package com.yueya.api.notice;

import java.util.Map;

import com.jfinal.aop.Duang;
import com.jfinal.kit.JsonKit;
import com.yueya.common.action.ApiController;

import net.sf.json.JSONObject;

/**
 * 通知
 * 
 * @author yangfeng
 * 
 */
public class INoticeController extends ApiController {

	public void index() {
	}

	// 获取列表
	public void getPageList() {
		JSONObject jo = this.getJson();
		Map<String, Object> map = Duang.duang(INoticeService.class).getPageList(jo);
		renderJson(JsonKit.toJson(map));
	}

	// 获取明细
	public void getDetail() {
		JSONObject jo = this.getJson();
		Map<String, Object> map = Duang.duang(INoticeService.class).getDetail(jo);
		renderJson(JsonKit.toJson(map));
	}

	// 获取明细
	public void setReaded() {
		JSONObject jo = this.getJson();
		Map<String, Object> map = Duang.duang(INoticeService.class).setReaded(jo);
		renderJson(JsonKit.toJson(map));
	}

	// 获取已读用户列表
	public void getReadedUserList() {
		JSONObject jo = this.getJson();
		Map<String, Object> map = Duang.duang(INoticeService.class).getReadedUserList(jo);
		renderJson(JsonKit.toJson(map));
	}

	
	// 获取通知未读数量
	public void getUnreadNum() {
		JSONObject jo = this.getJson();
		Map<String, Object> map = Duang.duang(INoticeService.class).getUnreadNum(jo);
		renderJson(JsonKit.toJson(map));
	}
	
	
	
}
